package com.tuanzi.loan.web.lazy.product.space;

import com.tuanzi.loan.business.service.product.space.LoanProductSpaceService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.product.space.LoanProductSpaceSearchRequest;
import com.tuanzi.loan.vo.response.product.space.LoanProductSpaceSearchResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

public class LoanProductSpaceLazyDataModel extends LazyDataSessionModel<LoanProductSpaceSearchRequest, LoanProductSpaceSearchResponse> {

	private LoanProductSpaceService loanProductSpaceService;

	public LoanProductSpaceLazyDataModel(LoanProductSpaceSearchRequest loanProductSpaceSearchRequest, CurrentUserBean session, LoanProductSpaceService loanProductSpaceService) {
		super(loanProductSpaceSearchRequest, session);
		this.loanProductSpaceService = loanProductSpaceService;
	}

	@Override
	protected Page<LoanProductSpaceSearchResponse> doLoad0(PageSearcher<LoanProductSpaceSearchRequest> pageSearcher) {
		return loanProductSpaceService.list(pageSearcher);
	}
}
